﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/admin/TempAdmin.master" CodeFile="AdminManage.aspx.cs" Inherits="admin_AdminManagre" %>
<asp:Content ID="adminContent" runat="server" ContentPlaceHolderID="ContentRight">
    <form id="MangeAdminForm" runat="server">
        <table>
             <tr>
                <td style="width: 150px">
                     <img src="../img/pixel_trans.gif" height="10px" />
                </td> 
            </tr>
            <tr>
                <td align="center">
                    <asp:Label ID="lblHeader" runat="server" ForeColor="Black" Font-Bold="true" Font-Size="Large" Text="Danh sách Admin"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 150px">
                     <img src="../img/pixel_trans.gif" height="10px" />
                </td> 
            </tr>
            <tr>
                <td>
                    <asp:GridView HeaderStyle-HorizontalAlign="Center" HorizontalAlign="Center" ID="gvAdmin" runat="server" AutoGenerateColumns="False" 
                        DataKeyNames="AdminID" ForeColor="Black" DataSourceID="adminDatasource" 
                        onselectedindexchanged="gvAdmin_SelectedIndexChanged">
                        <Columns>
                            <asp:BoundField ItemStyle-ForeColor="Black" ItemStyle-HorizontalAlign="Center" DataField="AdminID" HeaderText="AdminID" InsertVisible="False" 
                                ReadOnly="True" SortExpression="AdminID" />
                            <asp:BoundField ItemStyle-ForeColor="Black" ItemStyle-HorizontalAlign="Center" DataField="LoginName" HeaderText="LoginName" 
                                SortExpression="LoginName" />
                            <asp:TemplateField>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbUpdate" runat="server" style="color:Blue; font-family: Tahoma; text-decoration:none;" CommandName="select">&nbsp;&nbsp;&nbsp;&nbsp;Chitiết [&gt;&gt;]</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemStyle HorizontalAlign ="Center" />
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbDelete" runat="server" style=" color:Blue; font-family:tahoma; text-decoration: none" OnClientClick='return confirm("Bạn có chắc chắn muốn xóa sản phẩm này không ?")' CommandName="delete">&nbsp;&nbsp;&nbsp;&nbsp;Xóa 
                                    [x]</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <asp:ObjectDataSource ID="adminDatasource" runat="server" DeleteMethod="Delete" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetAllAdmin" 
            TypeName="BonSaiTableAdapters.AdminsTableAdapter">
            <DeleteParameters>
                <asp:Parameter Name="Original_AdminID" Type="Int32" />
            </DeleteParameters>
        </asp:ObjectDataSource>
    </form>
</asp:Content>